/**
 * 父父:"爷爷",父母:"奶奶",父妻:"妈妈",父夫:"爸爸",父兄:"伯父",父弟:"叔叔",母夫:"爸爸",
 * 父子:"兄弟",父女:"姐妹",父姐:"姑母",父妹:"姑姐",
 * 父兄妻:"伯母",父弟妻:"婶婶",父姐夫:"姑丈",父妹夫:"姑丈",
 * 母兄:"大舅",母弟:"小舅",母姐:"大姨",母妹:"小姨",
 * 母兄妻:"大舅妈",母弟妻:"小舅妈",母姐夫:"大姨夫",母妹夫:"小姨夫",
 * 父兄子:"堂兄弟",父弟子:"堂兄弟",父姐子:"表兄弟",父妹子:"表兄弟",
 * 母兄子:"表兄弟",母弟子:"表兄弟",母姐子:"表兄弟",母妹子:"表兄弟",
 * 父兄女:"堂姐妹",父弟女:"堂姐妹",父姐女:"表姐妹",父妹女:"表姐妹",
 * 母兄女:"表姐妹",母弟女:"表姐妹",母姐女:"表姐妹",母妹女:"表姐妹",
 * 夫兄:"大伯子",夫弟:"小叔子",夫姐:"大姑子",夫妹:"小姑子",
 * 妻兄:"大舅哥",妻弟:"小舅子",妻姐:"大姨子",妻妹:"小姨子",兄妻:"大嫂",弟妻:"弟妹",
 * 夫兄子:"侄子",夫弟子:"侄子",夫姐子:"姨甥",夫妹子:"姨甥",
 * 夫兄女:"侄女",夫弟女:"侄女",夫姐女:"姨甥女",夫妹女:"姨甥女",
 * 兄女:"侄女",弟女:"侄女",姐女:"外甥女",妹女:"外甥女",
 * 兄子:"侄子",弟子:"侄子",姐子:"外甥",妹子:"外甥",
 * 妻兄子:"内侄",妻弟子:"内侄",妻姐子:"外甥",妻妹子:"外甥",
 * 妻兄女:"内侄女",妻弟女:"内侄女",妻姐女:"外甥女",妻妹女:"外甥女",
 */
export enum me { ME = 'ME' };

/* 属于家族树的关系 */
export enum relationShipInTree {
  GRANDPARENTS_FATHER = 'GRANDPARENTS_FATHER', // 祖父、祖母
  GRANDPARENTS_MOTHER = 'GRANDPARENTS_MOTHER', // 外祖父、外祖母
  FATHER = 'FATHER', // 父亲
  MOTHER = 'MOTHER', // 母亲
  AUNT_FATHER = 'AUNT_FATHER', // 姑妈
  UNCLE_FATHER = 'UNCLE_FATHER', // 叔父、伯父
  AUNT_MOTHER = 'AUNT_MOTHER', // 姨妈
  UNCLE_MOTHER = 'UNCLE_MOTHER', // 舅父
  COUSIN_AUNT_FATHER = 'COUSIN_AUNT_FATHER', // 姑妈的孩子，自己的表兄弟、表姐妹
  COUSIN_UNCLE_FATHER = 'COUSIN_UNCLE_FATHER', // 叔父、伯父的孩子，自己的堂兄弟、堂姐妹
  COUSIN_AUNT_OR_UNCLE_MOTHER = 'COUSIN_AUNT_OR_UNCLE_MOTHER', // 姨妈、舅父的孩子，自己的表兄弟、表姐妹
  COUSIN_UNCLE_MOTHER = 'COUSIN_UNCLE_MOTHER', // 舅父的孩子，自己的表兄弟、表姐妹
  BROTHER = 'BROTHER', // 哥哥、弟弟
  SISTER = 'SISTER', // 姐姐、妹妹
  CHILDREN_BROTHER = 'CHILDREN_BROTHER', // 哥哥、弟弟的孩子，自己的侄子、侄女
  CHILDREN_SISITER = 'CHILDREN_SISITER', // 姐姐、妹妹的孩子，自己的外甥、外甥女
  SON = 'SON', // 儿子
  DAUGHTER = 'DAUGHTER', // 女儿
  GRANDCHILDREN_SON = 'GRANDCHILDREN_SON', // 孙子、孙女
  GRANDCHILDREN_DAUGHTER = 'GRANDCHILDREN_DAUGHTER', // 外孙、外孙女
}

/* 有关系，但不属于家族树 */
export enum relationShipNotInTree {
  WIFE_HUSBAND = 'WIFE_HUSBAND',
  PARENTS_IN_LAW = 'PARENTS_IN_LAW', // 岳父等关系
  CHILDREN_IN_LAW = 'CHILDREN_IN_LAW', // 孩子的妻子（丈夫）
  BROTHER_IN_LAW = 'BROTHER_IN_LAW', // 妻子(丈夫)的兄弟
  SISTER_IN_LAW = 'SISTER_IN_LAW', // 妻子(丈夫)的姐妹
  CHILDREN_BROTHER_IN_LAW = 'CHILDREN_BROTHER_IN_LAW', // 妻子(丈夫)的兄弟的孩子
  CHILDREN_SISTER_IN_LAW = 'CHILDREN_SISTER_IN_LAW', // 妻子(丈夫)的姐妹的孩子
  UNCLE_IN_LAW_FATHER = 'UNCLE_IN_LAW_FATHER', // 姑妈的丈夫
  UNCLE_IN_LAW_MOTHER = 'UNCLE_IN_LAW_MOTHER', // 姨妈的丈夫
  AUNT_IN_LAW_FATHER = 'AUNT_IN_LAW_FATHER', // 叔父、伯父的妻子
  AUNT_IN_LAW_MOTHER = 'AUNT_IN_LAW_MOTHER', // 舅父的妻子
}

export enum relationShipDoubt {
  UNCLE_FATHER_OR_FATHER = 'UNCLE_FATHER_OR_FATHER',
  CHILDREN_BROTHER_OR_SON = 'CHILDREN_BROTHER_OR_SON',
}


const allRelationShip = {
  ...me,
  ...relationShipInTree,
  ...relationShipNotInTree,
  ...relationShipDoubt
};

type GetKeysOfObject<T> = keyof T;
export type RelationShip = GetKeysOfObject<typeof allRelationShip>;
export type RelationShipNotInTree = GetKeysOfObject<typeof relationShipNotInTree>;
export type RelationShipInTree = GetKeysOfObject<typeof relationShipInTree>;

export default allRelationShip;